﻿using UnityEngine;
using System.Collections;

namespace UI
{
    public class TestBattleSelectItem : MonoBehaviour
    {
        public UILabel label;

        public string heroId;

        UIEventListener.VoidDelegate d = null;

        public void Init(string heroId, UIEventListener.VoidDelegate de)
        {
            label.text = heroId + ":" + TableTextBlo.GetText("name_" + heroId);
            this.heroId = heroId;
            d = de;
        }

        void OnClick()
        {
            if (d != null)
            {
                d(gameObject);
            }

        }
    }
}